function reverse(s:string):string;

var
	i,ls,kk:longint;
	t:char;

begin
ls := length(s);
kk := ls shr 1;
for i := 1 to kk do begin
	t := s[i];
	s[i] := s[ls - i + 1];
	s[ls - i + 1] := t;
end;
result := s;
end;